<?php
	if($this->documentData["directory_status"] == 0) 
	{
?>

<table summary="<?php echo count($this->pagesDatas), " version(s) de la page ", $this->documentData["document_path"]; ?>" class="dataArray">
	<caption><?php echo "Liste des versions de la page ",$this->documentData["document_path"]; ?></caption>
	<colgrouli>
		<col width="3%"/>
		<col width="16%"/>
		<col width="16%" class="hightLight"/>
		<col width="12%" />
		<col width="12%"/>
		<col width="12%"/>
		<col width="12%"/>
		<col width="12%"/>
	</colgrouli>
	<thead>
		<tr>
			<th>Version</th>
			<th>Date de création</th>
			<th>Auteur</th>
			<th colspan="5">Outils</th>
		</tr>
	</thead>
	<tbody>
		<?php
		
		$usr = new CMS_User();
		
		// echo "<pre>";
		// print_r($this->pagesDatas);
		// echo"</pre>";
		
		// echo "<pre>";
		// print_r($this->documentData);
		// echo"</pre>";
		
		Zend_Debug::dump($this->_helpers);
		
		
		foreach($this->pagesDatas as $row){
			echo "<tr>";
			echo "<td>",$row["version_number"],"</td>";
			echo "<td>",$row["date_creation"],"</td>";
			echo "<td>".$usr->getName($row['author_id'])."</td>";
			echo "<td><a href=\"/preview/page",$this->documentData["document_path"],"\">Prévisualiser</a></td>";
			echo "<td><a href=\"/edit/page/structure",$this->documentData["document_path"],"\">Modifer la structure</a></td>";
			echo "<td><a href=\"/edit/page/content",$this->documentData["document_path"],"\">Modifer le contenu</a></td>";
			echo "<td><a href=\"/publish",$this->documentData["document_path"],"\">Ajouter à la publication</a></td>";
			echo "<td><a href=\"/delete/page",$this->documentData["document_path"],"/version/",$row["version_number"],"\">Supprimer la version</a></td>";
			echo "</tr>";
			
			echo "<tr>";
			echo "<td>",$row["version_number"],"</td>";
			echo "<td>",$row["date_creation"],"</td>";
			echo "<td>".$usr->getName($row['author_id'])."</td>";
			echo "<td><a href=\"/preview/page",$this->documentData["document_path"],"\">Prévisualiser</a></td>";
			echo "<td><a href=\"/edit/page/structure",$this->documentData["document_path"],"\">Modifer la structure</a></td>";
			echo "<td><a href=\"/edit/page/content",$this->documentData["document_path"],"\">Modifer le contenu</a></td>";
			echo "<td><a href=\"/publish",$this->documentData["document_path"],"\">Ajouter à la publication</a></td>";
			echo "<td><a href=\"/delete/page",$this->documentData["document_path"],"/version/",$row["version_number"],"\">Supprimer la version</a></td>";
			echo "</tr>";
			
			echo "<tr>";
			echo "<td>",$row["version_number"],"</td>";
			echo "<td>",$row["date_creation"],"</td>";
			echo "<td>".$usr->getName($row['author_id'])."</td>";
			echo "<td><a href=\"/preview/page",$this->documentData["document_path"],"\">Prévisualiser</a></td>";
			echo "<td><a href=\"/edit/page/structure",$this->documentData["document_path"],"\">Modifer la structure</a></td>";
			echo "<td><a href=\"/edit/page/content",$this->documentData["document_path"],"\">Modifer le contenu</a></td>";
			echo "<td><a href=\"/publish",$this->documentData["document_path"],"\">Ajouter à la publication</a></td>";
			echo "<td><a href=\"/delete/page",$this->documentData["document_path"],"/version/",$row["version_number"],"\">Supprimer la version</a></td>";
			echo "</tr>";
			
			echo "<tr>";
			echo "<td>",$row["version_number"],"</td>";
			echo "<td>",$row["date_creation"],"</td>";
			echo "<td>".$usr->getName($row['author_id'])."</td>";
			echo "<td><a href=\"/preview/page",$this->documentData["document_path"],"\">Prévisualiser</a></td>";
			echo "<td><a href=\"/edit/page/structure",$this->documentData["document_path"],"\">Modifer la structure</a></td>";
			echo "<td><a href=\"/edit/page/content",$this->documentData["document_path"],"\">Modifer le contenu</a></td>";
			echo "<td><a href=\"/publish",$this->documentData["document_path"],"\">Ajouter à la publication</a></td>";
			echo "<td><a href=\"/delete/page",$this->documentData["document_path"],"/version/",$row["version_number"],"\">Supprimer la version</a></td>";
			echo "</tr>";
			
			echo "<tr>";
			echo "<td>",$row["version_number"],"</td>";
			echo "<td>",$row["date_creation"],"</td>";
			echo "<td>".$usr->getName($row['author_id'])."</td>";
			echo "<td><a href=\"/preview/page",$this->documentData["document_path"],"\">Prévisualiser</a></td>";
			echo "<td><a href=\"/edit/page/structure",$this->documentData["document_path"],"\">Modifer la structure</a></td>";
			echo "<td><a href=\"/edit/page/content",$this->documentData["document_path"],"\">Modifer le contenu</a></td>";
			echo "<td><a href=\"/publish",$this->documentData["document_path"],"\">Ajouter à la publication</a></td>";
			echo "<td><a href=\"/delete/page",$this->documentData["document_path"],"/version/",$row["version_number"],"\">Supprimer la version</a></td>";
			echo "</tr>";
			
			echo "<tr>";
			echo "<td>",$row["version_number"],"</td>";
			echo "<td>",$row["date_creation"],"</td>";
			echo "<td>".$usr->getName($row['author_id'])."</td>";
			echo "<td><a href=\"/preview/page",$this->documentData["document_path"],"\">Prévisualiser</a></td>";
			echo "<td><a href=\"/edit/page/structure",$this->documentData["document_path"],"\">Modifer la structure</a></td>";
			echo "<td><a href=\"/edit/page/content",$this->documentData["document_path"],"\">Modifer le contenu</a></td>";
			echo "<td><a href=\"/publish",$this->documentData["document_path"],"\">Ajouter à la publication</a></td>";
			echo "<td><a href=\"/delete/page",$this->documentData["document_path"],"/version/",$row["version_number"],"\">Supprimer la version</a></td>";
			echo "</tr>";
			
			echo "<tr>";
			echo "<td>",$row["version_number"],"</td>";
			echo "<td>",$row["date_creation"],"</td>";
			echo "<td>".$usr->getName($row['author_id'])."</td>";
			echo "<td><a href=\"/preview/page",$this->documentData["document_path"],"\">Prévisualiser</a></td>";
			echo "<td><a href=\"/edit/page/structure",$this->documentData["document_path"],"\">Modifer la structure</a></td>";
			echo "<td><a href=\"/edit/page/content",$this->documentData["document_path"],"\">Modifer le contenu</a></td>";
			echo "<td><a href=\"/publish",$this->documentData["document_path"],"\">Ajouter à la publication</a></td>";
			echo "<td><a href=\"/delete/page",$this->documentData["document_path"],"/version/",$row["version_number"],"\">Supprimer la version</a></td>";
			echo "</tr>";
			
			echo "<tr>";
			echo "<td>",$row["version_number"],"</td>";
			echo "<td>",$row["date_creation"],"</td>";
			echo "<td>".$usr->getName($row['author_id'])."</td>";
			echo "<td><a href=\"/preview/page",$this->documentData["document_path"],"\">Prévisualiser</a></td>";
			echo "<td><a href=\"/edit/page/structure",$this->documentData["document_path"],"\">Modifer la structure</a></td>";
			echo "<td><a href=\"/edit/page/content",$this->documentData["document_path"],"\">Modifer le contenu</a></td>";
			echo "<td><a href=\"/publish",$this->documentData["document_path"],"\">Ajouter à la publication</a></td>";
			echo "<td><a href=\"/delete/page",$this->documentData["document_path"],"/version/",$row["version_number"],"\">Supprimer la version</a></td>";
			echo "</tr>";
			
			echo "<tr>";
			echo "<td>",$row["version_number"],"</td>";
			echo "<td>",$row["date_creation"],"</td>";
			echo "<td>".$usr->getName($row['author_id'])."</td>";
			echo "<td><a href=\"/preview/page",$this->documentData["document_path"],"\">Prévisualiser</a></td>";
			echo "<td><a href=\"/edit/page/structure",$this->documentData["document_path"],"\">Modifer la structure</a></td>";
			echo "<td><a href=\"/edit/page/content",$this->documentData["document_path"],"\">Modifer le contenu</a></td>";
			echo "<td><a href=\"/publish",$this->documentData["document_path"],"\">Ajouter à la publication</a></td>";
			echo "<td><a href=\"/delete/page",$this->documentData["document_path"],"/version/",$row["version_number"],"\">Supprimer la version</a></td>";
			echo "</tr>";
			
			echo "<tr>";
			echo "<td>",$row["version_number"],"</td>";
			echo "<td>",$row["date_creation"],"</td>";
			echo "<td>".$usr->getName($row['author_id'])."</td>";
			echo "<td><a href=\"/preview/page",$this->documentData["document_path"],"\">Prévisualiser</a></td>";
			echo "<td><a href=\"/edit/page/structure",$this->documentData["document_path"],"\">Modifer la structure</a></td>";
			echo "<td><a href=\"/edit/page/content",$this->documentData["document_path"],"\">Modifer le contenu</a></td>";
			echo "<td><a href=\"/publish",$this->documentData["document_path"],"\">Ajouter à la publication</a></td>";
			echo "<td><a href=\"/delete/page",$this->documentData["document_path"],"/version/",$row["version_number"],"\">Supprimer la version</a></td>";
			echo "</tr>";
		 	 	 	 	
	}
	
	
?>
	</tbody>
</table>

<?php 
	}
	else 
	{
?>	
<ul>
	<li><a href="/create/file<?php echo $this->documentData["document_path"];?>">Créer une nouvelle page</a></li>
	<li><a href="/create/folder<?php echo $this->documentData["document_path"];?>">Créer un nouveau dossier</a></li>
	<li><a href="/modify/folder<?php echo $this->documentData["document_path"];?>">Modifier ce dossier</a></li>
	<li><a href="/delete/folder<?php echo $this->documentData["document_path"];?>">Supprimer ce dossier</a></li>
</ul>


<?php		
	}
?>